<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>API TEST</title>
<style>
.body{ font-size:14.5px;}
</style>
</head>
    <script type="text/javascript" src='/include/jquery.1.10.1.min.js'></script>

<body>

<div>
   <a href="#" id="postlink">post data</a>
</div>


<script type="text/javascript">

   $("#postlink").on('click',function(){


        $.ajax({
            url: 'http://120.24.177.211/api/api.php',
            type: 'POST',
            data:{ action:'test',smscode:'123',page_no:'2'},
            dataType: 'json',
            error: function(){
                  alert('Error loading PHP document'); 
                 },
            success: function(result){
 
                if(result.returncode==0){
                	alert('ok');
 
                }else{
                     alert("error");
                }
            }
        });

   });

</script>

</body>

</html>